﻿<ValueConversion(GetType(Object), GetType(BitmapImage))> _
Public Class comicPageVisibilityConverter
    Implements IValueConverter


    Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        Dim vis As Visibility = Visibility.Collapsed

        If Not value Is Nothing AndAlso value.GetType Is GetType(comicPage) Then
            vis = Visibility.Visible
        End If
        Return vis
    End Function

    Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
        Return Nothing
    End Function
End Class
